package dynamic.ibatis.executor.statement;



import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

import dynamic.ibatis.executor.parameter.DParameterHandler;
import dynamic.ibatis.mapping.DBoundSql;
import org.apache.ibatis.cursor.Cursor;
import org.apache.ibatis.executor.parameter.ParameterHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.session.ResultHandler;

/**
 * @author Clinton Begin
 */
public interface StatementHandler {

    Statement prepare(Connection connection, Integer transactionTimeout) throws SQLException;

    void parameterize(Statement statement) throws SQLException;

    void batch(Statement statement) throws SQLException;

    int update(Statement statement) throws SQLException;

    <E> List<E> query(Statement statement, ResultHandler resultHandler) throws SQLException;

    <E> Cursor<E> queryCursor(Statement statement) throws SQLException;

    DBoundSql getBoundSql();

    DParameterHandler getParameterHandler();

}
